#include "Image.h"

Image::Image(void)
{

}
Image::Image(unsigned int width,unsigned int height): Matrix(width, height*3)
{
}
Image::Image(const Image& source): Matrix(source)
{
}

Image::~Image(void)
{
}

void Image::setValue(unsigned int x, unsigned int y, const Color& value)
{

	Matrix::setValue(x, 3*y, value.r);
	Matrix::setValue(x, 3*y+1, value.g);
	Matrix::setValue(x, 3*y+2, value.b);
}

Image::Color Image::getValue(unsigned int x,unsigned int y) const
{
	Image::Color color;

	color.r= Matrix::getValue(x, 3*y);
	color.g= Matrix::getValue(x, 3*y+1);
	color.b= Matrix::getValue(x, 3*y+2);

	return color;
}
void Image::setHeight(unsigned int pHeight)
{
	Matrix::setHeight(pHeight * 3);
}
unsigned int Image::getHeight() const
{
	return Matrix::getHeight()/3;
}
unsigned int Image::getWidth() const
{
	return Matrix::getWidth();
}
void Image::setDimensions(unsigned int w,unsigned int h)
{
	Matrix::setDimensions(w, h*3);
}
void Image::transpose()
{
}
void Image::convolve()
{
}